package com.appwoo.txtws.adapter;

import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.appwoo.txtws.bean.EquipBean;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class EquipSelectAdapter extends ArrayAdapter<EquipBean>
{
  private boolean show = false;
  private Map<Integer, View> viewMap = new HashMap();

  public EquipSelectAdapter(Activity paramActivity, List<EquipBean> paramList)
  {
    super(paramActivity, 0, paramList);
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    View localView = (View)this.viewMap.get(Integer.valueOf(paramInt));
    Activity localActivity;
    EquipBean localEquipBean;
    TextView localTextView1;
    TextView localTextView2;
    TextView localTextView3;
    ImageView localImageView;
    String str1;
    String str2;
    if (localView == null)
    {
      localActivity = (Activity)getContext();
      localView = ((Activity)localActivity).getLayoutInflater().inflate(2130903124, null);
      localEquipBean = (EquipBean)getItem(paramInt);
      localTextView1 = (TextView)localView.findViewById(2131493165);
      localTextView2 = (TextView)localView.findViewById(2131493167);
      localTextView3 = (TextView)localView.findViewById(2131493166);
      localImageView = (ImageView)localView.findViewById(2131493164);
      if (localEquipBean.getUserName() != null)
        break label269;
      str1 = "";
      if (localEquipBean.getUserNick() != null)
        break label279;
      str2 = "";
      label130: if (!localEquipBean.getIsOnline().equals("1"))
        break label307;
      localTextView3.setTextColor(-16337385);
      localTextView3.setText(localActivity.getString(2131428014));
      if (!localEquipBean.getEquipType().toLowerCase().equals("pc"))
        break label289;
      localImageView.setImageDrawable(localActivity.getResources().getDrawable(2130838063));
      label193: localTextView1.setText(str2);
      if (!localEquipBean.getMnageType().equalsIgnoreCase("school"))
        break label392;
      localTextView2.setText("(" + str1 + ")" + localActivity.getString(2131428016));
    }
    while (true)
    {
      this.viewMap.put(Integer.valueOf(paramInt), localView);
      return localView;
      label269: str1 = localEquipBean.getUserName();
      break;
      label279: str2 = localEquipBean.getUserNick();
      break label130;
      label289: localImageView.setImageDrawable(localActivity.getResources().getDrawable(2130838060));
      break label193;
      label307: localTextView1.setTextColor(-10066330);
      localTextView2.setTextColor(-10066330);
      localTextView3.setTextColor(-10066330);
      localTextView3.setText(localActivity.getString(2131428015));
      if (localEquipBean.getEquipType().toLowerCase().equals("pc"))
      {
        localImageView.setImageDrawable(localActivity.getResources().getDrawable(2130838062));
        break label193;
      }
      localImageView.setImageDrawable(localActivity.getResources().getDrawable(2130838059));
      break label193;
      label392: localTextView2.setText("(" + str1 + ")" + localActivity.getString(2131428017));
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.adapter.EquipSelectAdapter
 * JD-Core Version:    0.6.2
 */